package cn.edu.tju.elm.vo;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 钱包相关的所有VO类
 */
public class WalletVO {

    // 创建钱包请求
    public static class CreateWalletRequest implements Serializable {
        private Boolean isVip;

        public Boolean getIsVip() {
            return isVip;
        }

        public void setIsVip(Boolean isVip) {
            this.isVip = isVip;
        }
    }

    // 充值请求
    public static class RechargeRequest implements Serializable {
        private BigDecimal amount;

        public BigDecimal getAmount() {
            return amount;
        }

        public void setAmount(BigDecimal amount) {
            this.amount = amount;
        }
    }

    // 提现请求
    public static class WithdrawRequest implements Serializable {
        private BigDecimal amount;

        public BigDecimal getAmount() {
            return amount;
        }

        public void setAmount(BigDecimal amount) {
            this.amount = amount;
        }
    }

    // 支付请求
    public static class PaymentRequest implements Serializable {
        private Integer toUserId;
        private BigDecimal amount;
        private Long orderId;

        public Integer getToUserId() {
            return toUserId;
        }

        public void setToUserId(Integer toUserId) {
            this.toUserId = toUserId;
        }

        public BigDecimal getAmount() {
            return amount;
        }

        public void setAmount(BigDecimal amount) {
            this.amount = amount;
        }

        public Long getOrderId() {
            return orderId;
        }

        public void setOrderId(Long orderId) {
            this.orderId = orderId;
        }
    }

    // 冻结请求
    public static class FreezeRequest implements Serializable {
        private BigDecimal amount;
        private Long orderId;

        public BigDecimal getAmount() {
            return amount;
        }

        public void setAmount(BigDecimal amount) {
            this.amount = amount;
        }

        public Long getOrderId() {
            return orderId;
        }

        public void setOrderId(Long orderId) {
            this.orderId = orderId;
        }
    }

    // 解冻请求
    public static class UnfreezeRequest implements Serializable {
        private BigDecimal amount;
        private Long orderId;

        public BigDecimal getAmount() {
            return amount;
        }

        public void setAmount(BigDecimal amount) {
            this.amount = amount;
        }

        public Long getOrderId() {
            return orderId;
        }

        public void setOrderId(Long orderId) {
            this.orderId = orderId;
        }
    }

    // 透支额度请求
    public static class CreditLimitRequest implements Serializable {
        private BigDecimal creditLimit;

        public BigDecimal getCreditLimit() {
            return creditLimit;
        }

        public void setCreditLimit(BigDecimal creditLimit) {
            this.creditLimit = creditLimit;
        }
    }

    // 钱包余额响应
    public static class WalletBalanceVO implements Serializable {
        private BigDecimal balance;
        private BigDecimal frozenAmount;
        private BigDecimal totalAssets;
        private BigDecimal availableAmount;
        private BigDecimal creditLimit;
        private BigDecimal overdraftAmount;
        private BigDecimal bonusAmount;
        private Boolean isVip;

        public BigDecimal getBalance() {
            return balance;
        }

        public void setBalance(BigDecimal balance) {
            this.balance = balance;
        }

        public BigDecimal getFrozenAmount() {
            return frozenAmount;
        }

        public void setFrozenAmount(BigDecimal frozenAmount) {
            this.frozenAmount = frozenAmount;
        }

        public BigDecimal getTotalAssets() {
            return totalAssets;
        }

        public void setTotalAssets(BigDecimal totalAssets) {
            this.totalAssets = totalAssets;
        }

        public BigDecimal getAvailableAmount() {
            return availableAmount;
        }

        public void setAvailableAmount(BigDecimal availableAmount) {
            this.availableAmount = availableAmount;
        }

        public BigDecimal getCreditLimit() {
            return creditLimit;
        }

        public void setCreditLimit(BigDecimal creditLimit) {
            this.creditLimit = creditLimit;
        }

        public BigDecimal getOverdraftAmount() {
            return overdraftAmount;
        }

        public void setOverdraftAmount(BigDecimal overdraftAmount) {
            this.overdraftAmount = overdraftAmount;
        }

        public BigDecimal getBonusAmount() {
            return bonusAmount;
        }

        public void setBonusAmount(BigDecimal bonusAmount) {
            this.bonusAmount = bonusAmount;
        }

        public Boolean getIsVip() {
            return isVip;
        }

        public void setIsVip(Boolean isVip) {
            this.isVip = isVip;
        }
    }
}
// 统一交易请求（RESTful风格）
 class TransactionRequest implements Serializable {
    private String type;        // RECHARGE, WITHDRAW, PAYMENT
    private BigDecimal amount;
    private Integer toUserId;   // 用于PAYMENT
    private Long orderId;    // 用于PAYMENT和FREEZE
    
    // Getters and Setters
    public String getType() { return type; }
    public void setType(String type) { this.type = type; }
    public BigDecimal getAmount() { return amount; }
    public void setAmount(BigDecimal amount) { this.amount = amount; }
    public Integer getToUserId() { return toUserId; }
    public void setToUserId(Integer toUserId) { this.toUserId = toUserId; }
    public Long getOrderId() { return orderId; }
    public void setOrderId(Long orderId) { this.orderId = orderId; }
}